package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;

/**
 * 类功能描述(类上)
 *
 * @author AnBetter
 * @since 2021-04-15
 */
public class PlayerAttestationRenderer implements Sequenceable, Serializable {
    @SerializedName("botguardData")
    private BotguardData botguardData;

    @SerializedName("challenge")
    private String challenge;

    public static final Sequenceable.Producer<PlayerAttestationRenderer> CREATOR = new Producer<PlayerAttestationRenderer>() {
        @Override
        public PlayerAttestationRenderer createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            PlayerAttestationRenderer playerAttestationRenderer= new PlayerAttestationRenderer();
            playerAttestationRenderer.unmarshalling(parcel);
            return playerAttestationRenderer;
        }
    };


    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeSequenceable(this.botguardData);
        parcel.writeString(this.challenge);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        parcel.readSequenceable(this.botguardData);
        this.challenge=parcel.readString();
        return true;
    }

    @Override
    public String toString() {
        return "PlayerAttestationRenderer{" +
                "botguardData = '" + botguardData + '\'' +
                ",challenge = '" + challenge + '\'' +
                "}";
    }
}
